﻿using System;
using System.Collections.Generic;
using Domain.MainModule.Entities;

namespace Application.MainModule.AddressManagement
{
    public interface IAddressManagementService
    {
        /// <summary>
        /// Add new address.
        /// </summary>
        /// <param name="address">Address to be added</param>
        void AddAddress(Address address);

        /// <summary>
        /// Change existing address.
        /// </summary>
        /// <param name="address">Existing address to modify.</param>
        void ChangeAddress(Address address);

        /// <summary>
        /// Find an address by its Id.
        /// </summary>
        /// <param name="addressId">AddressId</param>
        /// <returns>An address</returns>
        Address FindAddressById(Guid addressId);

        /// <summary>
        /// Find an address by user Id.
        /// </summary>
        /// <param name="userId">Membership UserId</param>
        /// <returns>An address</returns>
        List<Address> FindAddressByUserId(Guid userId);

        /// <summary>
        /// Remove an existing address.
        /// </summary>
        /// <param name="address">The adress to be removed.</param>
        void RemoveAddress(Address address);

        /// <summary>
        /// Find all address types with name match with <paramref name="addressTypeName"/>.
        /// </summary>
        /// <param name="addressTypeName">An address type name.</param>
        /// <returns>A collection of address type.</returns>
        List<AddressType> FindAddressTypeByName(string addressTypeName);
    }
}
